﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection;
using System.Web;
using MN.Framework.Common;

namespace EmailSender.Models
{
    [Table("SmtpServer")]
    public class SmtpServerModel : BaseEntity
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Column("ServerId")]
        [Display(Name = "شناسه سرور")]
        public override int ID { get; set; }

        [Required(ErrorMessage = "نام سرور نمیتواند خالی باشد")]
        [Display(Name = "نام سرور")]
        public string ServerName { get; set; }

         [Display(Name = "آدرس سرور")]
        public string ServerAddress { get; set; }

        [Required(ErrorMessage = "آدرس smtp نمیتواند خالی باشد")]
        [MaxLength(500)]
        [Display(Name = "آدرس SMTP")]
        public string SmtpAddress { get; set; }

        [Display(Name = "شماره پورت")]       
        public int? Port { get; set; }

        public virtual ICollection<SmtpCredentialModel> SmtpCredentials { get; set; }            
    }
}